import { defHttp } from "@/utils/http";

/** 4.05 */
// 获取指定部门下信息树形结构
export function systemDeptTree(params: Recordable) {
	return defHttp.get({ url: "/system/dept/tree", params });
}
// 获得病人基本信息
export function patientsGet(params: Recordable) {
	return defHttp.get({ url: "/his/th-patients/get", params });
}
// 创建病人基本信息
export function patientsCreate(params: Recordable) {
	return defHttp.post({ url: "/his/th-patients/create", params });
}
// 更新病人基本信息
export function patientsUpdate(params: Recordable) {
	return defHttp.put({ url: "/his/th-patients/update", params });
}
/** 4.09 */
// 统计每个科室检查数量
export function patientExamDeptExamCount(params: Recordable) {
	return defHttp.get({ url: "/his/th-patient-exam/dept/exam/count", params });
}
// 获得患者检查信息分页
export function patientExamPage(params: Recordable) {
	return defHttp.get({ url: "/his/th-patient-exam/page", params });
}

// 登记检查添加
export function patientHealthCheckPatientAdd(params: Recordable) {
	return defHttp.post({ url: "/his/patient/healthCheck/patient/add", params });
}
// 获得门诊预约
export function outPatientsGet(params: Recordable) {
	return defHttp.get({ url: "/his/opm-outpatients/get", params });
}
//创建门诊预约
export function outpatientsCreate(data: any) {
	return defHttp.post({ url: `/his/opm-outpatients/create`, data });
}

// 查询全部号码
export function queryAllNumbers(params: any) {
	return defHttp.get({ url: "/his/callnumber/queryAllNumbers", params });
}
//获得订单表
export function patOrdersPage(params: any) {
	return defHttp.get({ url: "/his/pat-orders/page", params });
}
//更新订单表
export function patOrdersUpdate(params: any) {
	return defHttp.put({ url: "/his/pat-orders/update", params });
}
// 叫号
export function callNumber(data: any) {
	return defHttp.post({ url: "/his/callnumber/callNumber", data });
}

/** 4.17 */
// 综合查询详细患者信息和健康状态
export function healthCheckPatientGet(patientId: string) {
	return defHttp.get({ url: `/his/patient/healthCheck/patient/get?patientId=${patientId}` });
}
// 综合健康检查更新-添加
export function healthCheckPatientUpdate(data: any) {
	return defHttp.post({ url: "/his/patient/healthCheck/patient/upda", data }, { isTransformResponse: false });
}

/** 4.21 */

// 综合查询患者转诊信息列表
export function patientsTransGetlist(params: Recordable) {
	return defHttp.post({ url: "/his/patients/trans/getlist", params });
}

/** 4.24 */

// 获得付款的历史记录分页
export function pmtHistoryPage(params: Recordable) {
	return defHttp.get({ url: "/his/pmt-history/page", params });
}

/** 4.25 */

// 获得患者用药信息分页
export function treatmentPhmPage(params: Recordable) {
	return defHttp.get({ url: "/his/treatment-phm/page", params });
}

/** 4.26 */

// 获得订单表分页
export function patientOrdersPage(params: Recordable) {
	return defHttp.get({ url: "/his/pat-orders/page", params });
}

/** 4.29.01 */

// 获得对象修改记录分页
export function depositHistoryPage(params: Recordable) {
	return defHttp.get({ url: "/his/deposit-history/page", params });
}

/** 4.31.01 */

// 获得订单项分页
export function patOrdersItemsPage(params: Recordable) {
	return defHttp.get({ url: "/his/pat-orders-items/page", params });
}

/** 4.30.03 */

// 获得医院诊断记录分页
export function diagnosisPage(params: Recordable) {
	return defHttp.get({ url: "/his/TH-diagnosis/page", params });
}

/** 4.30.04 */

// 获得医院服务信息分页
export function patServicesPage(params: Recordable) {
	return defHttp.get({ url: "/his/pat-services/page", params });
}

// 根据患者ID获得服务信息分页
export function patServicesPatpage(params: Recordable) {
	return defHttp.get({ url: "/his/pat-services/patpage", params });
}

/** 4.30.05 */

// 获得门诊预约分页new
export function outpatientsPagenew(params: Recordable) {
	return defHttp.get({ url: "/his/opm-outpatients/pagenew", params });
}

/** 4.30.12 */

// 查询病历信息分页
export function medicalRecordPage(params: Recordable) {
	return defHttp.get({ url: "/his/medical/record/page", params });
}

/*4.32.01 */
//获得未取药患者信息
export function treatmentPhm(params: object) {
	return defHttp.post({ url: `/his/treatment-phm/getPatient`, params });
}
//更新患者用药信息
export function treatmentPhmUpdate(params: object) {
	return defHttp.put({ url: `/his/treatment-phm/update`, params });
}

/** 4.32.03 */

// 获得医生申请分页
export function applyIndicatorPage(params: object) {
	return defHttp.get({ url: `/his/apply-indicator/page`, params });
}

//测试药品精简列表
export function drugs(params: Recordable) {
	return defHttp.get({ url: "/whs/drugs/simple-list", params });
}
//获得药品批次精简列表
export function drugDatch(params: Recordable) {
	return defHttp.get({ url: "/whs/drug-batch/page", params });
}
